Skip to content

precompiles: Add expmod benchmarks #1196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 17, 2025
Merged

precompiles: Add expmod benchmarks #1196

merged 1 commit into from
Apr 17, 2025

Conversation

chfast
Copy link
Member

@chfast chfast commented Apr 14, 2025

No description provided.

@chfast chfast added the precompiles Related to EVM precompiles label Apr 14, 2025
@chfast chfast requested a review from rodiazet April 14, 2025 09:05
Copy link

codecov bot commented Apr 14, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 94.78%. Comparing base (62ac627) to head (66c1870).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
test/precompiles_bench/precompiles_bench.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1196      +/-   ##
==========================================
- Coverage   94.79%   94.78%   -0.01%     
==========================================
  Files         172      172              
  Lines       19515    19517       +2     
==========================================
  Hits        18500    18500              
- Misses       1015     1017       +2     
Flag Coverage Δ
eest_gmp 15.41% <0.00%> (-0.01%) ⬇️
eof_execution_spec_tests 2.56% <ø> (ø)
ethereum_tests 21.07% <ø> (ø)
ethereum_tests_silkpre 18.23% <0.00%> (-0.01%) ⬇️
execution_spec_tests 18.24% <ø> (ø)
unittests 92.52% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
test/precompiles_bench/precompiles_bench.cpp 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +74 to +89
template <>
const inline std::array inputs<PrecompileId::expmod>{
"0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000203038f57abc91abff7dcbc5b55cd6aa454503850ce62e941f81273ba6008e82a530644e72e131a029b85045b68181585d2833e84879b9709143e1f593efffffff30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001"_hex,
"000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020239ea33f993130afd678f591cd1685d44779b7717156f2a715220955e10a234830644e72e131a029b85045b68181585d2833e84879b9709143e1f593efffffff30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001"_hex,
"0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000203914aeddf3af39bd5e0e231d09a8438cf38c7d0274a5aa61bd9a2bbcd77fd2c7ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc63254fffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"_hex,
"00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002027c816cec3d048eaae22d948c42f9d803d765d0827a7b49e01273031566eed92ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc63254fffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"_hex,
"0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200cf7d1e109b5b8f6a682be51e152d3668acc1b4d762ecbf5cdca7a807cc5fe4cffffffff00000001000000000000000000000000fffffffffffffffffffffffdffffffff00000001000000000000000000000000ffffffffffffffffffffffff"_hex,
"0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000203a122fd889a09d3a19c587ab486d5a6a2b39836d6d665c6ebad2a68a615e6736ffffffff00000001000000000000000000000000fffffffffffffffffffffffdffffffff00000001000000000000000000000000ffffffffffffffffffffffff"_hex,
"000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020161455250ee1d7ff76e4eb2f6a16a636a4bc69dd20416f6ea5647b7fb311e9320000000000000000000000000000000000000000000000000000000000ffffff30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001"_hex,
"0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200d96428856df2f1b728ce955f28f50befa405a61e8984acbaf678af9be0e0dfd000000000000000000000000000000000000000000000000000000000100000030644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001"_hex,
"0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000202369f74b39dddb516bb17d20f24ba72c8f0ec09bea7d7f38ad54dbc3cfd4b4760c19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f5230644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47"_hex,
"00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002019b01e88eb4a62d7df2da453deb859f6113004675370b6f54ff9f20499cfc4cf0c19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f5230644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47"_hex,
"000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020c943d0f2b95b88d8a3ad7782221659f05cb697047a9793a65ec7db59439afb0a3fffffffffffffffffffffffffffffffffffffffffffffffffffffffbfffff0cfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"_hex,
"000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020307c38188f3b804fc399b7195579269fd60fddbe7e6d8174b3ad38b64b1bb2fa3fffffffffffffffffffffffffffffffffffffffffffffffffffffffbfffff0cfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"_hex,
};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any case with even and power of 2 modulus.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because they don't happen on mainnet

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's on mainnet stays on mainnet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decided on chat to add these cases later.

@chfast chfast merged commit ecb77a5 into master Apr 17, 2025
24 of 26 checks passed
@chfast chfast deleted the modexp-bench branch April 17, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
precompiles Related to EVM precompiles
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants